package cn.tedu.mall1.personal.service.impl;

import cn.tedu.mall1.personal.mapper.PersonalMapper;
import cn.tedu.mall1.personal.pojo.dto.PersonalDTO;
import cn.tedu.mall1.personal.pojo.dto.PersonalOrderDTO;
import cn.tedu.mall1.personal.pojo.vo.PersonalV0;
import cn.tedu.mall1.personal.service.PersonalService;
import lombok.extern.slf4j.Slf4j;
import lombok.val;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Slf4j
@Service
public class PersonalServiceImpl implements PersonalService {

    @Autowired
    private PersonalMapper personalMapper;

    @Override
    public PersonalV0 selectUser(String username) {
        log.debug("入参:{}",username);
        PersonalV0 personalV0 = personalMapper.selectUser(username);
        return personalV0;
    }

    @Override
    public List<PersonalOrderDTO> selectOrder(String username) {
        log.debug("入参:{}",username);
        List<PersonalOrderDTO> personalOrderDTO = personalMapper.selectOrder(username);
        return personalOrderDTO;
    }

    @Override
    public void updatePersonal(PersonalDTO personalDTO) {
        personalMapper.updatePersonalDTO(personalDTO);
    }


}
